import { createRouter, createWebHistory } from 'vue-router';
import Ptdt from '../views/ptdt.vue';
import Ptdtxqy from '../views/ptdtxqy.vue';
import Zcfg from '../views/zcfg.vue';
import Zcfgxqy from '../views/zcfgxqy.vue';
import Wgts from '../views/wgts.vue';
import Wgtsxqy from '../views/wgtsxqy.vue';
import Grzx from '../views/grzx.vue';
import Qyxx from '../views/qyxx.vue';

const routes = [
  { 
    path: '/', 
    redirect: '/index' // 添加根路径重定向
  },
  {
    path: '/index',
    name: 'Index',
    component: () => import('../views/index.vue')
  },
  {
    path: '/ptdt', 
    name: 'Ptdt',
    component: Ptdt
  },
   {
    path:'/xxgg',
    name:'xxgg',
    component:() => import('../views/xxgg.vue')
  },
  {
    path:'/xxggxqy',
    name:'xxggxqy',
    component:() => import('../views/xxggxqy.vue')
  },
  {
    path: '/ptdtxqy', 
    name: 'Ptdtxqy',
    component: Ptdtxqy
  },
  {
    path: '/zcfg', 
    name: 'Zcfg',
    component: Zcfg
  },
  {
    path: '/zcfgxqy', 
    name: 'Zcfgxqy',
    component: Zcfgxqy
  },
  {
    path: '/wgts',
    name: 'Wgts',
    component: Wgts
  },
  
  {
    path: '/wgts/:id',
    name: 'Wgtsxqy',
    component: Wgtsxqy,
    props: true 
  },
   {
    path: '/grzx',
    name: 'Grzx',
    component: Grzx
  },
  {
    path: '/qyxx',
    name: 'Qyxx',
    component: Qyxx
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;